//
// Created by kepeiyang on 2021/2/26.
//

#ifndef SERVICE_COMMON_H
#define SERVICE_COMMON_H

#include "ResData.h"
#include "Util.h"

typedef struct moduleHandler{
    string cmd;
    void (*func)(string data, ResData& res_data);
}moduleHandler_t;



#define RET_OK      (0)
#define RET_ERROR   (-1)
#define ERRCD_NONPC "-40"
#define ERRCD_NOMAP "-30"

#define ERRCD_NOPLAYER "-20"

#define ERRCD_FALSE     "-2"
#define ERRCD_INDATA    "-1"
#define ERRCD_PASS      "0"
#define ERRCD_NONE      "1"
#define OKACKDATA       "\"res\":\"ok\""
#define ERRACKDATA      "\"res\":\"err\""
#define NONEACKDATA     "\"res\":\"none\""

#endif //SERVICE_COMMON_H
